<?php $this->load->view('admin/common/pageHead'); ?>
<?php $this->load->view('admin/common/pageHeader'); ?>


<div class="fLeft">
    <?php $this->load->view('admin/common/left_nav'); ?>
</div>
<table
    style="border-color: #EAC8B3; border-left: 1px solid #EAC8B3; border-right: 1px solid #EAC8B3; border-style: solid; border-width: 1px;"
    align="center">
    <tbody>
        <tr>
            <td colspan="3" class="fotter-color" align="center"><b>Add Painting</b>
            </td>
        </tr>

        <tr>
            <td colspan="3" class="style2" align="left">
                <form name="form1" action="/add_galleryForm" method="post"
                      enctype="multipart/form-data" onSubmit="return addgallery();">

                    <table border="0" cellpadding="0" cellspacing="0" height="25"
                           width="550" align="center">
                        <tbody>
                            <tr>
                                <td class="tdclass" width="150">Select Artist:<span
                                        style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
                                </td>
                                <td>
                                    <div id="artistDiv">
                                        <select name="artistID" id="artistID">
                                            <option value="">Please Select</option>
                                            <?php foreach ($artist as $temp => $admin) { ?>
                                                <option value=<?php echo $admin['artist_id']; ?>>
                                                    <?php echo $admin['fname']; ?>
                                                </option>
                                            <?php } ?>
                                            <option value="other" onclick="checkIt(this);">Other</option>
                                        </select>
                                    </div>
                                </td>

                                <td height="58" colspan="9" align="center">
                                    <div id="text" style="display: none; width: 100px;">
                                        <a href="addnewArtist.php">Add Artist</a>
                                    </div>
                                </td>
                            </tr>

                            <tr>
                                <td class="tdclass" width="150">Select Category:<span
                                        style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
                                </td>

                                <td class="tdclass" width="150"><select name="categoryID"
                                                                        id="categoryID" onchange="chooseTheme()">
                                        <option value="">Please Select</option>
                                        <?php foreach ($category as $temp => $admin) { ?>
                                            <option value=<?php echo $admin['cat_id']; ?>>
                                                <?php echo $admin['name']; ?>
                                            </option>
                                        <?php } ?>

                                    </select></td>
                            </tr>
                            <tr>


                            <tr>
                                <td>&nbsp;</td>
                            </tr>
                            <tr>
                                <td class="tdclass" width="150">Select Theme:<span
                                        style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
                                </td>
                                <td>
                                    <div id="themeDiv">
                                        <select name="themeID" id="themeID">
                                            <option value="">Please Select</option>
                                        </select>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                            </tr>
                            <tr>
                                <td class="tdclass" width="150">Select Medium:<span
                                        style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
                                </td>
                                <td>
                                    <div id="mediumDiv">
                                        <select name="mediumID" id="mediumID">
                                            <option value="">Please Select</option>

                                        </select>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                            </tr>

                            <tr>
                                <td class="tdclass" width="150">Painting Name:<span
                                        style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
                                </td>
                                <td><input name="Gname" class="form_input" id="Gname" value=""
                                           type="text"></td>
                            </tr>
                            <tr>


                            <tr>
                                <td>&nbsp;</td>
                            </tr>
                        <td class="tdclass" width="150">Painting Image:<span
                                style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
                        </td>
                        <td><input name="Gimage" class="form_input" id="Gimage" value=""
                                   type="file"></td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                        </tr>

                        <tr>
                            <td class="tdclass" width="150">Painting Size:</td>
                            <td><input name="Gsize" class="form_input" id=""
                                       Gsize"" value="" type="text"></td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td class="tdclass" width="150">Painting Price:</td>
                            <td><input name="Gprice" class="form_input" id="Gprice" value=""
                                       type="text"></td>
                        </tr>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td colspan="10" height="58" align="center"><input name="update"
                                                                               class="form_input" id="update" value="ADD" type="submit">&nbsp;<input
                                                                               value="Cancel" class="" onclick="javascript:history.back();"
                                                                               type="reset">
                            </td>
                        </tr>

                        </tbody>
                    </table>
                </form>
            </td>
        </tr>
    </tbody>
</table>

<script type="text/javascript">
                          function checkIt(el)
                          {
                              if (el.value == "other") {
                                  document.getElementById('text', 'text1').style.display = "block";
                              }
                              else {
                                  document.getElementById('text', 'text1').style.display = "none";
                                  document.getElementById('who').value = '';
                              }
                          }
</script>
<script type="text/javascript">


</script>



<div class="clr"></div>
<?php $this->load->view('admin/common/pageFooter'); ?>